/* This module defines functions that allows the OS to retrieve the entry point of a program from its name */

#ifndef USER_PROGRAMS_H
#define USER_PROGRAMS_H

#include "types.h"
#include "string.h"

/* include (or define) the user programs signature here */
#include "count.h"
#include "fibonacci.h"
#include "uart_test.h"
#include "increment.h"
#include "supervised_spawn.h"
#include "supervise.h"
#include "scroller.h"
#include "shell.h"
#include "ring.h"
#include "ring_node.h"

/* count of the number of UP in the system (don't forget to update) */
#define COUNT_UP 10

/* function declaration */

/* returns the id of the UP called program_name */
int32_t get_program_id(char* program_name);

/* returns the entry point of the UP having program_id as id */
uint32_t get_entry_point(int32_t program_id);

/* copy the program name of the program having program_id as id in the program_name buffer (up to n characters). Returns 1 if success, 0 otherwise. */
int32_t get_program_name(int32_t program_id, char* program_name, int32_t n);

#endif
